/*
 *
 *      Copyright (c) 2018-2025, st All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the pig4cloud.com developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: st
 *
 */

package com.mkh.st.admin.api.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 * 角色表
 * </p>
 *
 * @author st
 * @since 2017-10-29
 */
@Data
@ApiModel(value = "角色")
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class SysRole extends Model<SysRole> {

	private static final long serialVersionUID = 1L;
	/**
	 * 角色id
	 */
	@TableId
	@ApiModelProperty(value="角色id")
	private Long roleId;
	/**
	 * 角色名称
	 */
	@ApiModelProperty(value="角色名称")
	private String roleName;
	/**
	 * 角色编码
	 */
	@ApiModelProperty(value="角色编码")
	private String roleCode;
	/**
	 * 上级角色id
	 */
	@ApiModelProperty(value="上级角色id")
	private Long parentId;
	/**
	 * 来源
	 */
	@ApiModelProperty(value="来源")
	private String resource;
	/**
	 * 状态：1启用0禁用
	 */
	@ApiModelProperty(value="状态：1启用0禁用")
	private Integer status;
	/**
	 * 角色描述
	 */
	@ApiModelProperty(value="角色描述")
	private String description;
	/**
	 *
	 */
	@ApiModelProperty(value="")
	private LocalDateTime createTime;
	/**
	 * 创建人
	 */
	@ApiModelProperty(value="创建人")
	private String createBy;
	/**
	 *
	 */
	@ApiModelProperty(value="")
	private LocalDateTime updateTime;
	/**
	 * 修改人
	 */
	@ApiModelProperty(value="修改人")
	private String updateBy;
	/**
	 * 租户id
	 */
	@ApiModelProperty(value="租户id",hidden=true)
	private Long tenantId;
	/**
	 * 删除标记：1已删除，0未删除
	 */
	@ApiModelProperty(value="删除标记：1已删除，0未删除")
	private Integer delFlag;
	/**
	 * 系统内置角色 0否1是
	 */
	@ApiModelProperty(value="系统内置角色 0否1是")
	private Integer sysFlag;

	@ApiModelProperty(value="创建人id")
	private Long createId;

	@ApiModelProperty(value="修改人id")
	private Long updateId;

	public SysRole(Long id,Integer status){
		this.roleId=id;
		this.status=status;
	}

}
